The models predict Acceleration and calculate Subject Vehicle Trajectories. We have used multiple machine learning models in this project.
width=“70%” height=“70%”>

This project aims to understand and explore trajectories of various Car Following Models that predict Acceleration. The raw NGSIM data will be preprocessed to cleanup bad data and filter only valid pairs that would help train the model on I-80 and US-101 Highways. The goal is to compare and evaluate the performance of different Models (Random Forest, k Nearest Neighbors, and CNN) and discuss the trajectories along with their R^2 and RMSE.

The following open source packages are used in this project: * Numpy * Pandas * TensorFlow * Keras * Matplotlib * Sklearn * pathlib * random * seaborn * pickle * streamlit

The dataset used in this project is called * Next Generation Simulation (NGSIM) * and it is publicly available on the U.S. Department of Transportation website. The NGSIM dataset consists of 25 columns and 11.8 million rows of vehicle trajectory data which was captured using a network of synchronized digital video cameras on 4 different locations (US 101, I-80, Peachtree, and Lankershim). The data contains the location of a vehicle at every one-tenth of a second, which gives the exact position of each vehicle relative to other vehicles. A total of 3 different types of vehicle data can be found in this dataset, namely Car, Truck, and Motorcycle. Most of the data were taken from the two freeways i.e., US 101 and I-80, and among the three vehicle types, data on Cars is more as compared to Trucks and Motorcycles. Therefore, we decided to work on only the Freeways. After the Preliminary analysis, we found that some vehicle IDs are present in more than one location meaning that the data from all four locations were taken separately and then merged in a single file. Hence, we separated the data based on location to carry out data cleaning and data transformation and then merge them back.
The NGSIM dataset is publicly available. Please refer to the Link

We trained three models namely k-Nearest Neighbors, Random Forest, and CNN to predict Acceleration for Subject Vehicle and find rest of the trajectory. The goals of this project include the following:
Clean and Transform the NGSIM Data
Train Random Forest, KNN and CNN on same Train Data.
Compare R2 and RMSE for the models.
Validate Vehicle Trajectories and compare with R2 and RMSE outcomes.

The NGSIM (Next Generation Simulation) dataset includes vehicle trajectory details along with the information of Lead and Following vehicle IDs. Even though the dataset has been processed by the Transportation department there are quite a few instances of Bad Data and vehicle trajectories which wont help in training for a good Car following model. Thus, we have preprocessed the data as per below:

Below are the cleanup tasks that have been performed:

Below are the transformation steps that have been followed:

The overall accuracy score of personal and impersonal models are shown in the following tables. Some of the results we observed are similar to the results obtained by Weiss et.al and they are discussed below:


🎓 All participants in this project are Student of Post Graduate Diploma in Data Analytics for Business @ St Clair College
👦 Vineet Dhamija
Email: VD17@myscc.ca
GitHub:
@VineetDhamija
👦 Neel Chaudhari
Email: NC57@myscc.ca
GitHub:
@neelschaudhari000
👦 Rakesh Singh
Email: rs334@myscc.ca
GitHub:
@rakesh894
👦 Umair Durrani
Email: UDURRANI@stclaircollege.ca
GitHub:
@durraniu
✤ This was the final project for the course DAB402- Capstone (Summer 2022), at St Clair College
If you see mistakes or want to suggest changes, please create an issue on the source repository.
For attribution, please cite this work as
Chaudhari (2022, July 13). Neel Chaudhari: Data-Driven Car Following Model using Python. Retrieved from https://neelchaudhari.netlify.app/projects/2022-07-24-Car Following Data-Driven Model/
BibTeX citation
@misc{chaudhari2022data-driven,
author = {Chaudhari, Neel},
title = {Neel Chaudhari: Data-Driven Car Following Model using Python},
url = {https://neelchaudhari.netlify.app/projects/2022-07-24-Car Following Data-Driven Model/},
year = {2022}
}